﻿
using System;
using System.Collections.Generic;
using System.Web.UI.HtmlControls;
using Utils;


public partial class WebPage_YingXiao_DuanxinQunfa : MarketBBasePage
{


    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
        this.HeaderControl1.Select = "yingxiao";
        if ((base.Request.HttpMethod == "POST") && ((base.Request.Form["phones"] != null) && (base.Request.Form["content"] != null)))
        {
            if (this.setPhone(base.Request.Form["phones"].ToString(), base.Request.Form["content"].ToString()))
            {
                base.SetSuccess("发送成功");
            }
            else
            {
                this.SetError("发送失败");
            }
        }
    }

    private bool setPhone(string telNumber, string telContent)
    {
        List<string> mobiles = new List<string>();
        string[] strArray = telNumber.Split(new char[] { ',' });
        for (int i = 0; i < strArray.Length; i++)
        {
            mobiles.Add(strArray[i]);
        }
        return base.SendSMS(mobiles, telContent);
    }
}

